package com.cloud.pole.shop.biz.goods;

import java.util.List;

import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.ace.cache.annotation.CacheClear;
import com.cloud.pole.common.biz.BaseBiz;
import com.cloud.pole.mapper.goods.ShopGoodsAttrValueMapper;
import com.cloud.pole.shop.model.entity.goods.ShopGoodsAttrValue;

@Service
@Transactional(rollbackFor = Exception.class)
public class ShopGoodsAttrValueBiz extends BaseBiz<ShopGoodsAttrValueMapper, ShopGoodsAttrValue> {
	@CacheClear(key= "shopGoodsAttrList{1.goodsId}")
	public void insertGoodsAttrValue(ShopGoodsAttrValue shopGoodsAttrValue) {
		mapper.inertInFoGoodsAttrValue(shopGoodsAttrValue);
	}
	
	public List<ShopGoodsAttrValue> selectByGoodsAttrValue(Integer goodsId){
		return mapper.selectByGoodsIdShopGoodsAttrValue(goodsId);
	}
	
	@CacheClear(key= "shopGoodsAttrList{1}")
	public void deleteByGoodsAttrVal(Integer goodsId) {
		mapper.deleteBy(goodsId);
	}
	
	
}
